import Login from '../components/Login.vue'

const Home = () => import('@/views/Home')
const Welcome = () => import('../components/Welcome.vue')
const users = () => import('../components/user/users.vue')
const rights = () => import('../components/power/Rights.vue')
const roles = () => import('../components/power/Roles.vue')
const Cates = () => import('../components/goods/Cates.vue')
const Params = () => import('../components/goods/Params.vue')
const Report = () => import('../components/report/Report.vue')
const List = () => import('../components/goods/List.vue')
const Add = () => import('../components/goods/Add.vue')
const SellerPages = () => import('../views/visualizationPages/SellerPages.vue')
const TrendPage = () => import('@/views/visualizationPages/TrendPage')
const MapPage = () => import('@/views/visualizationPages/MapPage')
const RankPage = () => import('@/views/visualizationPages/RankPage')
const HotPage = () => import('@/views/visualizationPages/HotPage')
const StockPage = () => import('@/views/visualizationPages/StockPage')

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    redirect: '/welcome',
    children: [
      { path: '/welcome', component: Welcome },
      { path: '/users', component: users },
      { path: '/rights', component: rights },
      { path: '/roles', component: roles },
      { path: '/categories', component: Cates },
      { path: '/params', component: Params },
      { path: '/reports', component: Report },
      { path: '/goods', component: List },
      { path: '/goods/add', component: Add }
    ]
  },
  // {
  //   path: '/reports',
  //   component: Report
  // },
  {
    path: '/sellerpages',
    component: SellerPages
  },
  {
    path: '/trendpage',
    component: TrendPage
  },
  {
    path: '/mappage',
    component: MapPage
  },
  {
    path: '/rankpage',
    component: RankPage
  },
  {
    path: '/hotpage',
    component: HotPage
  },
  {
    path: '/stockpage',
    component: StockPage
  }
]

export default routes
